package com.zyzo.demo.appengine.server.security;

import org.restlet.security.SecretVerifier;

import com.zyzo.demo.appengine.model.User;
import com.zyzo.demo.appengine.model.UserDao;

public class MyVerifier extends SecretVerifier {

    @Override
    public boolean verify(String identifier, char[] secret) 
    {
    	//if(1==1)return true;
    	User o = UserDao.getInstance().getUserByEmail( identifier );
    	if( o==null )return false;
    	
    	return  compare( o.getPassword().toCharArray(),secret );
    	
    	
    }

}